<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>010.0015.p08.宏任务中的微任务误解.html</title>
    <script>

      // window.onload = function(){
      //   console.log('js执行完成 , window context 退出');
      // }
    </script>
</head>
<body>
    <div>
        <div id="showRespDataId"></div>
        <hr><br><hr>
        <div id="showAllNet"></div>
    </div>
</body>
<script>


let p01 = new Promise((resolve , reject ) => {
    setTimeout(()=>{
        resolve()
        console.log('setTimeout');

    } , 0)

    console.log('promise');
}).then((resolve)=>{
    console.log('成功');
} , (reject)=>{

    console.log('失败');
})

console.log('main 0 ');

</script>
</html>